package com.ruoyi.house.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.WebmagicYearMapper;
import com.ruoyi.house.domain.WebmagicYear;
import com.ruoyi.house.service.IWebmagicYearService;
import com.ruoyi.common.core.text.Convert;

/**
 * 年度销售Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-09
 */
@Service
public class WebmagicYearServiceImpl implements IWebmagicYearService 
{
    @Autowired
    private WebmagicYearMapper webmagicYearMapper;

    /**
     * 查询年度销售
     * 
     * @param id 年度销售主键
     * @return 年度销售
     */
    @Override
    public WebmagicYear selectWebmagicYearById(Long id)
    {
        return webmagicYearMapper.selectWebmagicYearById(id);
    }

    /**
     * 查询年度销售列表
     * 
     * @param webmagicYear 年度销售
     * @return 年度销售
     */
    @Override
    public List<WebmagicYear> selectWebmagicYearList(WebmagicYear webmagicYear)
    {
        return webmagicYearMapper.selectWebmagicYearList(webmagicYear);
    }

    /**
     * 新增年度销售
     * 
     * @param webmagicYear 年度销售
     * @return 结果
     */
    @Override
    public int insertWebmagicYear(WebmagicYear webmagicYear)
    {
        return webmagicYearMapper.insertWebmagicYear(webmagicYear);
    }

    /**
     * 修改年度销售
     * 
     * @param webmagicYear 年度销售
     * @return 结果
     */
    @Override
    public int updateWebmagicYear(WebmagicYear webmagicYear)
    {
        return webmagicYearMapper.updateWebmagicYear(webmagicYear);
    }

    /**
     * 批量删除年度销售
     * 
     * @param ids 需要删除的年度销售主键
     * @return 结果
     */
    @Override
    public int deleteWebmagicYearByIds(String ids)
    {
        return webmagicYearMapper.deleteWebmagicYearByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除年度销售信息
     * 
     * @param id 年度销售主键
     * @return 结果
     */
    @Override
    public int deleteWebmagicYearById(Long id)
    {
        return webmagicYearMapper.deleteWebmagicYearById(id);
    }
}
